package com.swa99ylum.pjv.sample.s03_corrector.s0310;

import java.util.Map;
import java.util.Random;

import com.alibaba.fastjson.JSONPath;
import com.swa99ylum.pjv.corrector.Corrector;
import com.swa99ylum.pjv.util.PJVUtils;

/**
 * 修正方式：为 $.student.pet.name 去重
 *
 */
public class Corrector0 extends Corrector {
	@Override
	public void doCorrect(Object rootObject, String[] nodePath, String nodeName, Map<String, Object> parentValue, Object incorrectValue) {
		
		JSONPath.set(rootObject, PJVUtils.getNodePathStr(nodePath), incorrectValue + "#"+new Random().nextInt(100));
		
	}

}
